package com.zego.wawaji.third.pay;

import android.support.v4.app.FragmentActivity;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;

import com.zego.wawaji.R;
import com.zego.wawaji.ui.base.BasePanel;

/**
 * 支付列表
 */
public class BasePayPannel extends BasePanel implements View.OnClickListener {
    private FragmentActivity activity;

    public ImageView paylist_item_icon, iv_choose_state;
    public TextView paylist_item_title, paylist_item_remark;


    public BasePayPannel(FragmentActivity activity) {
        super(activity);
        this.activity = activity;
        setContentView(R.layout.pay_item);
        paylist_item_icon = (ImageView) findViewById(R.id.paylist_item_icon);
        paylist_item_title = (TextView) findViewById(R.id.paylist_item_title);
        paylist_item_remark = (TextView) findViewById(R.id.paylist_item_remark);
        iv_choose_state = (ImageView) findViewById(R.id.iv_choose_state);
    }

    public void setChooseState(boolean isChoose) {
        iv_choose_state.setSelected(isChoose);
    }

    /**
     * activity
     *
     * @return
     */
    public FragmentActivity getActivity() {
        return this.activity;
    }

    @Override
    public void onClick(View v) {
    }


    public void setTextTitle(String text) {
        paylist_item_title.setText(text);
    }

    public void setTextRemark(String text) {
        paylist_item_remark.setText(text);
    }

    public void setImageIcon(int resId) {
        paylist_item_icon.setImageResource(resId);
    }
}
